#include "net.hpp"

void Messagecallback(const bitrpc::BaseConnection::ptr &conn, bitrpc::BaseMessage::ptr &msg)
{
    /* 此时的msg内部是Json::Value */
    std::string body = msg->serialize();  /* 本来是去执行业务层的回调函数，这里直接进行序列化 */
}

int main()
{
    bitrpc::BaseServer::ptr ptr = bitrpc::ServerFactory::create();
    ptr->setMessageCallback(Messagecallback);
    ptr->start();

    return 0;
}